<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./ajax.js"></script>
    <script>
        // function fn(){
        //     /* 使用.then .catch来获取promise返回结果 */
        //     let result = PromiseAjax({
        //         url:"http://localhost/project/server/check.php"
        //     })
        //     // console.log(result);
        //     result
        //     .then((res)=>{
        //         console.log(res);
        //     })
        // }
        // fn();


        async function fun(){
            let result = await PromiseAjax({
                url:"http://localhost/project/server/check.php"
            })
            console.log(result);
        }
        fun()

    </script>
</body>
</html>